# FAN0  PA8     Extruder 0 fan
# FAN1  PE5     model fan0
# FAN2  PD12    Extruder 1 fan
# FAN3  PD13    model fan1
# FAN4  PD14
# FAN5  PD15    associated with heater(s) or/and extruder(s) of a comma separated list
# FAN6  -
# FAN7  -


[heater_fan fan_ext0]                       # Extruder 0 radiator fan
pin:                            PA8         # FAN1
max_power:                      1.0
shutdown_speed:                 1.0
hardware_pwm:                   False
kick_start_time:                0.1
off_below:                      0.3
heater:                         extruder
heater_temp:                    50
fan_speed:                      1

#1# [heater_fan fan_ext1]                       # Extruder 1 radiator fan
#1# pin:                            PD12        # FAN2
#1# max_power:                      1.0
#1# shutdown_speed:                 1.0
#1# hardware_pwm:                   False
#1# kick_start_time:                0.1
#1# off_below:                      0.3
#1# heater:                         extruder1
#1# heater_temp:                    50
#1# fan_speed:                      1

[fan_generic fan_extruder]                 # first model extruder for IDEX
pin:                            PE5        # FAN1
max_power:                      1.0
#shutdown_speed:
#cycle_time:
hardware_pwm: False
kick_start_time: 0.5
off_below: 0.3

#1# [fan_generic fan_extruder1]                 # second model extruder for IDEX
#1# pin:                            PD13        # FAN2
#1# max_power:                      1.0
#shutdown_speed:
#cycle_time:
#1# hardware_pwm: False
#1# kick_start_time: 0.5
#1# off_below: 0.3

[controller_fan controller_fan]             # associated with heater(s) or/and extruder(s) of a comma separated list
pin:                            PD15        # FAN5
max_power:                      1.0
shutdown_speed:                 1.0
hardware_pwm:                   True
kick_start_time:                0.1
off_below:                      0.3
tachometer_pin:                 ^PB2        # EXP2_5
fan_speed:                      1.0
idle_timeout:                   30

#[temperature_fan my_temp_fan]                   #  will be enabled whenever its associated sensor is above a set temperature
#pin:
#max_power:
#shutdown_speed:
#cycle_time:
#hardware_pwm:
#kick_start_time:
#off_below:
#tachometer_pin:
#tachometer_ppr:
#tachometer_poll_interval:
#enable_pin:
#   See the "fan" section for a description of the above parameters.
#sensor_type:
#sensor_pin:
#control:
#max_delta:
#min_temp:
#max_temp:
#   See the "extruder" section for a description of the above parameters.
#pid_Kp:
#pid_Ki:
#pid_Kd:
#   The proportional (pid_Kp), integral (pid_Ki), and derivative
#   (pid_Kd) settings for the PID feedback control system. Klipper
#   evaluates the PID settings with the following general formula:
#     fan_pwm = max_power - (Kp*e + Ki*integral(e) - Kd*derivative(e)) / 255
#   Where "e" is "target_temperature - measured_temperature" and
#   "fan_pwm" is the requested fan rate with 0.0 being full off and
#   1.0 being full on. The pid_Kp, pid_Ki, and pid_Kd parameters must
#   be provided when the PID control algorithm is enabled.
#pid_deriv_time: 2.0
#   A time value (in seconds) over which temperature measurements will
#   be smoothed when using the PID control algorithm. This may reduce
#   the impact of measurement noise. The default is 2 seconds.
#target_temp: 40.0
#   A temperature (in Celsius) that will be the target temperature.
#   The default is 40 degrees.
#max_speed: 1.0
#   The fan speed (expressed as a value from 0.0 to 1.0) that the fan
#   will be set to when the sensor temperature exceeds the set value.
#   The default is 1.0.
#min_speed: 0.3
#   The minimum fan speed (expressed as a value from 0.0 to 1.0) that
#   the fan will be set to for PID temperature fans.
#   The default is 0.3.
#gcode_id:
#   If set, the temperature will be reported in M105 queries using the
#   given id. The default is to not report the temperature via M105.

#[fan]                                           # model fan only for one extruder
#pin:                            PA8             # FAN0
#   Output pin controlling the fan. This parameter must be provided.
#max_power:                      1.0
#   The maximum power (expressed as a value from 0.0 to 1.0) that the
#   pin may be set to. The value 1.0 allows the pin to be set fully
#   enabled for extended periods, while a value of 0.5 would allow the
#   pin to be enabled for no more than half the time. This setting may
#   be used to limit the total power output (over extended periods) to
#   the fan. If this value is less than 1.0 then fan speed requests
#   will be scaled between zero and max_power (for example, if
#   max_power is .9 and a fan speed of 80% is requested then the fan
#   power will be set to 72%). The default is 1.0.
#shutdown_speed: 0
#   The desired fan speed (expressed as a value from 0.0 to 1.0) if
#   the micro-controller software enters an error state. The default
#   is 0.
#cycle_time: 0.010
#   The amount of time (in seconds) for each PWM power cycle to the
#   fan. It is recommended this be 10 milliseconds or greater when
#   using software based PWM. The default is 0.010 seconds.
#hardware_pwm:                   False
#   Enable this to use hardware PWM instead of software PWM. Most fans
#   do not work well with hardware PWM, so it is not recommended to
#   enable this unless there is an electrical requirement to switch at
#   very high speeds. When using hardware PWM the actual cycle time is
#   constrained by the implementation and may be significantly
#   different than the requested cycle_time. The default is False.
#kick_start_time:                0.5
#   Time (in seconds) to run the fan at full speed when either first
#   enabling or increasing it by more than 50% (helps get the fan
#   spinning). The default is 0.100 seconds.
#off_below:                      0.3
#   The minimum input speed which will power the fan (expressed as a
#   value from 0.0 to 1.0). When a speed lower than off_below is
#   requested the fan will instead be turned off. This setting may be
#   used to prevent fan stalls and to ensure kick starts are
#   effective. The default is 0.0.
#
#   This setting should be recalibrated whenever max_power is adjusted.
#   To calibrate this setting, start with off_below set to 0.0 and the
#   fan spinning. Gradually lower the fan speed to determine the lowest
#   input speed which reliably drives the fan without stalls. Set
#   off_below to the duty cycle corresponding to this value (for
#   example, 12% -> 0.12) or slightly higher.
#tachometer_pin:
#   Tachometer input pin for monitoring fan speed. A pullup is generally
#   required. This parameter is optional.
#tachometer_ppr: 2
#   When tachometer_pin is specified, this is the number of pulses per
#   revolution of the tachometer signal. For a BLDC fan this is
#   normally half the number of poles. The default is 2.
#tachometer_poll_interval: 0.0015
#   When tachometer_pin is specified, this is the polling period of the
#   tachometer pin, in seconds. The default is 0.0015, which is fast
#   enough for fans below 10000 RPM at 2 PPR. This must be smaller than
#   30/(tachometer_ppr*rpm), with some margin, where rpm is the
#   maximum speed (in RPM) of the fan.
#enable_pin:
#   Optional pin to enable power to the fan. This can be useful for fans
#   with dedicated PWM inputs. Some of these fans stay on even at 0% PWM
#   input. In such a case, the PWM pin can be used normally, and e.g. a
#   ground-switched FET(standard fan pin) can be used to control power to
#   the fan.
